Code Scrawl Status

Versions

Lexing (ast generation) is not really ready

  • v0.3 depends on lexer v0.6, which is abandoned but stable??
  • v0.4 depends on lexer v0.2, which supports SIMPLE bash lexing & SIMPLE php lexing
  • v0.5 depends on lexer v0.2, which is under development & has several failing tests
  • v0.6 depends on lexer v0.7, the up & coming lexer

v0.4

  • I'm changing how outputs and mdverbs work, so I can have actual method declarations for each of the verbs to tell what they do, instead of digging through code & analyzing the addOutput() calls & the parsing of arg list strings

Current

Basically, its in a very messy state and it needs some real time & attention to clean everything up.

  • My lexer isn't properly parsing php. I need to fix this. Especially look at Grammar.php's ast. It IS getting onLexerStart() method, but its being recorded as a function in the file, not a method of the class.
  • I just started updating the verbAst function (old implementation for @ast()), but didn't finish. Right now I just have it calling the method used for @ast_class(), but I haven't confirmed it due to the aforementioned lexer issues
  • My templates verb function also needs updated to the latest version.

Ideas / TODO (low priority)

  • build a php autoloader for the project (very nice for libs with no dependencies)

Next

  • Better error reporting in the cli, especially for verb messups
  • Document
  • shorthand extension declaration for built-in extensions.
    • Lang\\* to load all language extensions
    • MdVerb\\Ast for Ast extension (instead of \Tlf\Scrawl\Ext\MdVerb\Ast)
  • Remove the key=>value pairing & switch to pure array of class names (and shorthands)
  • a disable key to disable certain extensions that are automatically setup.
  • Add simple api for calling templates (likely with an mdverb extension)
  • Make tests pass
  • Reduce memory usage somehow?
  • @install() to show installation instructions. Maybe @install(composer, gitclone, otherInstallMethodName) to choose which install methods should be shown (& what order)
  • Write a .config/scrawl.json file when it doesn't exist (prompt first)
  • @ast(type, key, astprop.whatever). Example: @ast(class, \Tlf\Scrawl, methods.__construct.docblock) will print a trimmed docblock into the md file
  • @todo() to print all TODOs found in the code base
    • @TODO(*) to output all TODOs (or something like it)
    • @TODO(rel/file.ext) to output all TODOs from rel/file.ext
  • Improve the template for classList
  • Configs for what generated output files should be written
  • (simple version exists as @file()) @require(dir/filename.json)... to load exactly the contents of a file. Maybe @loadFile(name, optionalLoadingArguments, forExtensions)
  • @bash(function, arg1 arg2 arg3)
  • Include an example scrawl.json file
  • @see_class(ClassName) to output [FqnClassName](LinkToClassFile)
  • @see_function(FunctionName) to output [function_name()](LinkToFunctionFile)
  • @see_file(Rel/FileName) to output a link to the file (allows scrawl to report errors, so you know the link stays valid)
  • filename.src.md.php to execute as php file, THEN run code scrawl
    • filename.src.php.md to run code scrawl THEN execute as php file
  • @see_dependencies() to show links to all dependencies (as declared in composer.json)
  • add optional link checking (curl every link to make sure they are valid)
  • Create a code scrawl template for install php & install composer)
  • Create an mdverb that gets a meta description from a url

Latest (newest to oldest)

  • changed lex setting to lex.php and lex.bash and now it defaults to false
  • @ast_class works! @ast does too, but its currently just an alias for @ast_class
  • add error reporting via $scrawl->error('header', $msg)
  • Modify mdverb regex to allow @verb()s anywhere, not just at the start of a line. & remove requirement for rest of line to be whitespace.
  • add @easy_link(twitter, TaelufDev) mdverb.
  • Added composer_install template
  • Added @template(template_name, ...args) as part of Md/SimpleVerbs extension
  • Add lex config to conditionally disable the lexer.
  • Md verb methods now receive a list of args instead of an argListString. The about the match is passed in an array as the first arg
  • Vastly improved @ast()
  • Refactored namespaces & other stuff. Much cleaned up!
  • Refactored to interface-driven extension system (rather than key-based)
  • Clean up documentation files
  • @file(relative/path/to/file.whatever) to include the trimmed contents of a file
  • Cached lexer asts (in Lexer)
  • Minor fixes
  • new ApiLexer extension integrates with the PHPGrammar of my lexer library